package com.zhongdone.pattern.structural.adapter.interfaceAdapter;


/**
 * 适配器
 */
public class PowerAdapter implements DC {

    private AC220 ac220;

    public PowerAdapter(AC220 ac220){
        this.ac220 = ac220;
    }

    @Override
    public int output5V() {
        Integer adapterInput = this.ac220.outputAC220V();
        Integer adapterOutput = adapterInput/44;
        System.out.println("使用Adapter输入AC"+adapterInput+"V， 输出DC"+adapterOutput+"V");
        return adapterOutput;
    }

    @Override
    public int output12V() {
        return 0;
    }

    @Override
    public int output24V() {
        return 0;
    }

    @Override
    public int output36V() {
        return 0;
    }
}
